#ifndef __CAMERA_CONTROLLER_H__
#define __CAMERA_CONTROLLER_H__

#include <Ogre.h>
#include <OIS.h>
#include "Controller.h"
#include "PlayerController.h"

using namespace Ogre;

class CameraController : public AbstractController
{
	enum CAMERA_STATUS
	{
		STOP = 0,
		SCAN_WORLD,
		FOLLOW_PLAYER,
		SURROUND_PLAYER
	};

protected://field
	SceneManager* mSceneMgr;
	Camera* mCamera;
	PlayerController* pPlayerController;
	CAMERA_STATUS mStatus;

	Real mCameraDistance;
	Radian mAngleSpeed;
	Ogre::Vector3 mRotateAxis;
	Radian mAngleLeft;

public:
	CameraController(SceneManager *sm);
	virtual ~CameraController(){}
	virtual void AddTime(Real deltatime);
	virtual void SetCameraStatus(CAMERA_STATUS s);
	CAMERA_STATUS GetCameraStatus();
	void SetCameraDistance(Real x);
	Real GetCameraDistance();

private:
	void Initialization();
	virtual void Send( PapaBallMsg msg );

};
#endif
